<template>
	<view>
		<view class="footer">
			<view class="footer_bar">
				<view class="tabbar_warp">
					<view class="tabbar" @tap='linkbtn' :data-webview="tabbar1_url">
							<text>致敬自然</text>
					</view>
					<view class="tabbar">
						<text class="nav" @tap='clickbtn' :class="active">电商活动</text>
						<view class="info" :hidden='info'>
							<view :data-webview="shop_url">
								<text>皇家美素佳儿</text>
							</view>
							<view>
								<image class="menu_border" :src="menu_border_bg"></image>
							</view>
							<view  :data-webview="shop_url">
								<text>美素佳儿</text>
							</view>
						</view>
					</view>
					<view class="tabbar" @tap='linkbtn' :data-webview="tabbar3_url">
							<text>正品购买</text>
					</view>
					<view class="tabbar" @tap='linkbtn' :data-webview="tabbar4_url">
							<text>会员注册</text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info: true,
				active:'',
				tabbar1_url:'https://www.frisobaby.com/mobile/friso/nature/',
				tabbar3_url:'https://www.frisobaby.com/mobile/buy/',
				tabbar4_url:'https://www.frisobaby.com/mobile/register/',
				shop_url:'https://frisoprestige.m.tmall.com/'
			};
		},
		methods: {
			clickbtn: function() {
				this.info = !this.info;
				this.active == ''?this.active='active':this.active='';
			},
			linkbtn: function(e) {
				var webview = e.currentTarget.dataset.webview
				if (webview !== '') {
					uni.navigateTo({
						url: '/pages/link/link?url=' + webview
					})
				}
			},
		}
	}
</script>

<style>
	.footer {
		position: fixed;
		bottom: 0;
		width: 100%;
		z-index: 999;
	}

	.footer_bar .active {
		background-color: #0D2F6D;
	}

	.footer_bar {
		width: 100%;
		height: 76upx;
		line-height: 76upx;
		background-color: #fff;
		box-shadow: 0 0 8upx #87919a;
	}

	.footer_bar .tabbar_warp {
		width: 100%;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
	}

	.footer_bar .tabbar_warp .tabbar {
		text-align: center;
		background-color: #014495;
		position: relative;
		border-right: 2upx solid #eee;
		box-sizing: border-box;
		/* width: 25%; */
		float: left;
		flex: 1;
	}

	.footer_bar .tabbar_warp .tabbar:last-child {
		border-right: none;
	}

	.footer_bar .info {
		background-color: rgba(227, 228, 223, .8);
		width: 100%;
		position: absolute;
		top: -108upx;
		z-index: 19;
	}

	.menu_border {
		width: 100%;
		height: 2upx;
		vertical-align: middle;
	}

	.footer_bar .info view {
		width: 100%;
		background-color: transparent;
		height: 54upx;
		line-height: 54upx;
	}

	.footer_bar .info view:nth-child(2) {
		height: 2upx;
		width: 100%;
		line-height: 2upx;
	}

	.info view text {
		font-size: 24upx !important;
		color: #856127 !important;
	}

	.footer_bar .active {
		background-color: #0D2F6D;
	}

	.footer_bar .tabbar_warp .tabbar text {
		color: #ffffff;
		font-size: 24upx;
		width: 100%;
		display: block;
	}
</style>
